package com.youlu.campus.entity.course.dto;

import com.youlu.campus.entity.UserPO;
import com.youlu.campus.entity.course.group.CoursePay;
import com.youlu.campus.entity.course.group.Info;
import com.youlu.campus.entity.course.group.VideoStudy;
import com.youlu.campus.entity.enums.CourseOrderTypeEnum;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;

/**
 * @author : [dengbo]
 * @className : CourseInfoDTO
 * @description : [描述说明该类的功能]
 * @createTime : [2022/5/17 18:21]
 */
@Data
public class CourseInfoDTO {
    @NotBlank(message = "活动id不能为空", groups = {Info.class, CoursePay.class, VideoStudy.class})
    private String activityId;
    @NotBlank(message = "课程id不能为空", groups = {VideoStudy.class, CoursePay.class})
    private String courseId;
    /**
     * 0:播放 1:暂停 2结束
     */
    @Range(min = 0, max = 2, message = "视频播放类型错误", groups = {VideoStudy.class})
    private int videoPlayType;
    @NotBlank(message = "视频Id不能为空", groups = {VideoStudy.class})
    private String videoId;
    //@Min(value = 0, message = "播放时长不能为小于0",groups = {VideoStudy.class})
    private int currentDuration;
    private UserPO userPO;
    private String appId;
    private String userId;
    private String platform;
    private String clientIp;
    private String notifyUrl;
    private Integer courseOrderType = CourseOrderTypeEnum.VIDEO.getValue();
    private String qaInfoId;
    private String activityChannelId;
}
